package Code.System;

public class SystemDemo2 {
    public static void main(String[] args) {

        //方法1的运行时间
        long start = java.lang.System.currentTimeMillis();

        for (int i = 1; i <= 100000; i++) {
            Boolean flag = isOrime2(i);
            if (flag){
                System.out.println(i);
            }
        }

        long end = java.lang.System.currentTimeMillis();

        System.out.println(end - start);


    }

    public static boolean isOrime1(int number){
        for (int i = 2; i < number; i++) {
            if (number % 1 ==0){
                return true;
            }
        }
        return false;
    }
    public static boolean isOrime2(int number){
        for (int i = 2; i < Math.sqrt(number); i++) {

        } if (number % 1 ==0){
            return true;
        }
        return false;
    }
}
